From e3164246e1733c717072b804566a485458769314 Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Mon, 24 Oct 2022 07:19:52 +0200 Subject: create simple stats page --- .../src/routes/bots/[bot_name]/stats.svelte | 169 +++++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 web/pw-server/src/routes/bots/[bot_name]/stats.svelte (limited to 'web/pw-server/src/routes/bots/[bot_name]/stats.svelte') diff --git a/web/pw-server/src/routes/bots/[bot_name]/stats.svelte b/web/pw-server/src/routes/bots/[bot_name]/stats.svelte new file mode 100644 index 0000000..6b5a2e1 --- /dev/null +++ b/web/pw-server/src/routes/bots/[bot_name]/stats.svelte @@ -0,0 +1,169 @@ + + + + +
+
+

{bot["name"]}

+ {#if owner} + + {owner["username"]} + + {/if} +
+

Stats

+ + + + + + + + + + {#each leaderboard as entry, index} + + + + + + {#if mergedStats[entry["bot"]["name"]]} + + + {:else} + {/if} + + {/each} +
RankRatingBotAuthorWinrateMatches
{index + 1} + {entry["rating"].toFixed(0)} + + {entry["bot"]["name"]} + + {#if entry["author"]} + + {entry["author"]["username"]} + {/if} + + {winRate(mergedStats[entry["bot"]["name"]]).toFixed(2)} + + view matches + + no matches yet
+
+ + -- cgit v1.2.3